﻿<UserControl
xmlns:my="clr-namespace:SilverFlow.Controls;assembly=SilverFlow.Controls"  
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
	xmlns:SilverlightDebateViewModel="clr-namespace:SilverlightDebateViewModel;assembly=SilverlightDebateViewModel" 
	xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" 
	xmlns:SilverlightDebateView_Behaviors="clr-namespace:SilverlightDebateView.Behaviors" 
	xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" 
	xmlns:local="clr-namespace:SilverlightDebateView" 
	xmlns:PopupBehaviorProto="clr-namespace:PopupBehaviorProto" xmlns:SilverlightDebateView_Views="clr-namespace:SilverlightDebateView.Views" 
	x:Class="SilverlightDebateView.MainPage"
	mc:Ignorable="d"
	d:DesignHeight="449" d:DesignWidth="602" Height="600" Width="800">
<UserControl.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="/SilverFlow.Controls;component/Themes/generic.xaml"/>
			</ResourceDictionary.MergedDictionaries>
			</ResourceDictionary>
	</UserControl.Resources>
	<UserControl.DataContext>
		<SilverlightDebateViewModel:MainPageViewModel/>
	</UserControl.DataContext>

      <my:FloatingWindowHost x:Name="MainPageLayoutRoot" Margin="0,0,0,37">
      	<i:Interaction.Triggers>
      		<i:EventTrigger>
      			<SilverlightDebateView_Behaviors:OpenStatementsBehavior/>
      		</i:EventTrigger>
      		<ei:PropertyChangedTrigger Binding="{Binding SelectedStatementToOpen}">
      			<SilverlightDebateView_Behaviors:OpenStatementBehavior SelectedStatement="{Binding SelectedStatementToOpen}"/>
      		</ei:PropertyChangedTrigger>
      		<ei:PropertyChangedTrigger Binding="{Binding ReturnICommandNewOpinion}">
      			<PopupBehaviorProto:PopUpProtoV2 PropertyName="ObjOpinion" ReturnICommand="{Binding ReturnICommandNewOpinion}" HostMainViewModel="{Binding Mode=OneWay}">
      				<PopupBehaviorProto:PopUpProtoV2.CustomChildWindow>
      					<SilverlightDebateView_Views:WindowNewOpinion/>
      				</PopupBehaviorProto:PopUpProtoV2.CustomChildWindow>
      			</PopupBehaviorProto:PopUpProtoV2>
      		</ei:PropertyChangedTrigger>
      		<ei:PropertyChangedTrigger Binding="{Binding SelectedCategory}">
      			<PopupBehaviorProto:PopUpProtoV2NewStatement PropertyName="ObjStatement" ReturnICommand="{Binding CreateNewStatementCommand}" SelectedCategory="{Binding SelectedCategory}" HostMainViewModel="{Binding Mode=OneWay}">
      				<PopupBehaviorProto:PopUpProtoV2NewStatement.CustomChildWindow>
      					<SilverlightDebateView_Views:WindowNewStatement/>
      				</PopupBehaviorProto:PopUpProtoV2NewStatement.CustomChildWindow>
      			</PopupBehaviorProto:PopUpProtoV2NewStatement>
      		</ei:PropertyChangedTrigger>
      	</i:Interaction.Triggers>
			<my:FloatingWindowHost.Background>
				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
					<GradientStop Color="#FF779CE7" Offset="1"/>
					<GradientStop Color="#FFEAF7FF"/>
					<GradientStop Color="#FFB6CBF1" Offset="0.733"/>
				</LinearGradientBrush>
			</my:FloatingWindowHost.Background>

		</my:FloatingWindowHost>

</UserControl>

